<%@ taglib prefix="s" uri="/struts-tags"%>

<s:form method="post" action="updateMerchantAccount.htm" theme="simple" id="form">
<table width="100%">
	<tr>
		<td height="40" colspan="2" class="sectionheading bottom-border">
			Merchant Account Setup
		</td>
	</tr>
	<tr>
		<td class="verdana11greynormal">
			<p align="justify">
				Please choose your merchant account or billing system provider and
				also enter your billing system login or username and password. These
				information will be used for real time credit card processing.
				<br>
				<br>

			</p>
				<!------------------------------------------------------------->
				<table border="0" cellpadding="0" cellspacing="0">
					<tbody>
						<tr>
							<td>
								<s:actionerror cssClass="note-red"/>
								<s:fielderror cssClass="note-red"/>
								<s:actionmessage cssClass="note-red"/>
							</td>
						</tr>
						<tr>
							<td class="verdana11greynormal" colspan="2">
								<b>Merchant Provider</b>
							</td>
						</tr>
						<tr>
							<td width="100%" class="verdana11greynormal">
								<table border="0" bordercolor="#f7f7f7" cellpadding="8"
									cellspacing="0">
									<tbody>
										<tr>
											<td class="verdana12blacknormal">
												Select your merchant account provider:
											</td>
											<td class="verdana11greynormal">
												<s:select list="listMerchantAccount" theme="simple" cssClass="Textfiled-border" listKey="id" listValue="accountName" value="%{defaultMerchantAccount}"></s:select>
											</td>
										</tr>
									</tbody>
								</table>
							</td>
						</tr>
					</tbody>
				</table>

			<s:iterator value="listMerchantAccount" status="rowstatus">
				<s:hidden name="merchantAccountMap[%{id}].id" value="%{id}" />
				<s:hidden name="merchantAccountMap[%{id}].accountName" value="%{accountName}" />
				<s:hidden name="merchantAccountMap[%{id}].defaultAccount" value="%{defaultAccount}" />
				<!------------------------------------------------------------->
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<tbody>
						<tr>
							<td class="verdana11greynormal" colspan="2">
								<b class="verdana12darkgreybold"><s:property value="accountName" /></b>
							</td>
						</tr>
						<tr>
							<td width="100%">
								<table width="100%" border="0" cellpadding="5"
									cellspacing="0" bordercolor="#f7f7f7">
									<tbody>
										<tr>
											<td width="30%" height="70%" align="right" class="verdana12blacknormal">
												Merchant Login:											</td>
											<td>
												<s:textfield theme="simple" cssClass="Textfiled-border" name="merchantAccountMap[%{id}].merchantLogin" value="%{merchantLogin}" size="30" />
											</td>
										</tr>
										<tr>
											<td align="right" class="verdana12blacknormal">
												Merchant Password:
											</td>
											<td align="left">
												<s:textfield theme="simple" cssClass="Textfiled-border" name="merchantAccountMap[%{id}].merchantPassword" value="%{merchantPassword}" size="30" />
										  </td>
										</tr>
									</tbody>
							  </table>
							</td>
						</tr>
					</tbody>
			  </table>
			</s:iterator>
				<!------------------------------------------------------------->
				<table width="100%">
					<tbody>
						<tr>
							<td align="center" width="100%">
								<s:submit theme="simple" type="image" src="../Admin-Images/save-chagnes-button.gif" value="Save Changes" />
								<input type="image" src="../Admin-Images/reset-button.gif" value="Reset" onclick="this.form.reset();">
							</td>
						</tr>
					</tbody>
				</table>
				<!------------------------------------------------------------->
		</td>
	</tr>
</table>
</s:form>